//首页学习应试组件
import React from 'react';
import  { Component } from 'react';

export default class extends Component {
    constructor(props){
        super();
        this.state={
            title:props.title,
            msg:props.msg,
            msg2:props.msg2,
            img:props.img,

            isActive:props.isActive
        }
    }
    UNSAFE_componentWillReceiveProps(props){
        this.setState({
            title:props.title,
            msg:props.msg,
            msg2:props.msg2,
            img:props.img,

            isActive:props.isActive
        });
    }
 render(){
     return(
         <div className={this.state.isActive?"SVGInfoBox SVGInfoBox_Active":"SVGInfoBox"}>
             <div className="SVGInfoBox_SVG">
                 <img alt="img" src={this.state.img} style={{widht:"40px",height:"40px"}}/>
             </div>
             <div  className={this.state.isActive?"SVGInfoBox_Info SVGInfoBox_Info_Active":"SVGInfoBox_Info"}>
                <div >
                    {this.state.title}
                </div>
                <div  className={this.state.isActive?"SVGInfoBox_Info_Desc SVGInfoBox_Info_Desc_Active":"SVGInfoBox_Info_Desc"}>
                    {this.state.msg}
                </div>
                <div className={this.state.isActive?"SVGInfoBox_Info_Desc SVGInfoBox_Info_Desc_Active":"SVGInfoBox_Info_Desc"}>
                    {this.state.msg2}
                </div>
             </div>
         </div>
     )
 }
}